<?php
namespace app\models;

use Yii;
use yii\base\Model;
use yii\db\ActiveRecord;

class Enterprise extends ActiveRecord{

    public static function tableName()
    {
        return '{{Enterprise}}';
    }

    public function rules()
    {
        return [
            [['name','telephone','address','business_type','recruitment','range','request','salary_1','salary_2','information','photo'],'required','message'=>'内容不能为空'],
            ['photo','file','skipOnEmpty' => false,'extensions' => 'png,jpg,jpeg','message'=>'上传格式不正确'],
        ];
    }

}